﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>ORDGetLinearEntities3dNames</Title>
      <Author>innovoCAD</Author>
      <Description>Code snippet for getting LinearEntities3d string name list.</Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>ORDGetLinearEntities3dNames</Shortcut>
    </Header>
    <Snippet>
      <References>
        <Reference>
          <Assembly>Bentley.CifNET.GeometryModel.SDK.4.0</Assembly>
        </Reference>
      </References>
      <Imports>
	  <Import>
          <Namespace>System.Collections.Generic</Namespace>
        </Import>
        <Import>
          <Namespace>SDK = Bentley.CifNET.GeometryModel.SDK</Namespace>
        </Import>
      </Imports>		
      <Code Language="csharp" Delimiter="$"><![CDATA[///<summary>Get LinearEntities3d string name list.</summary>
        private List<string> GetLinearEntities3d
        {
            get
            {
                List<string> LinearEntity3dNames = new List<string>();

                //Checking for Active SDK connection and LinearEntities3d nullification
                if (SDKCon.GetActive() == null || SDKCon.GetActive().LinearEntities3d == null)
                    LinearEntity3dNames.Add("None");
                else
                    foreach (SDK.LinearEntity3d linearEntity3d in SDKCon.GetActive().LinearEntities3d)
                    {
                        if (!string.IsNullOrEmpty(linearEntity3d.Name))
                            LinearEntity3dNames.Add(linearEntity3d.Name);
                    }

                LinearEntity3dNames.Sort();
                return LinearEntity3dNames;
            }
        }]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>